package com.chenyue.cm.user.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.math.BigDecimal;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 优惠券
 * </p>
 *
 * @author Lbx
 * @since 2024-03-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("jd_discount_coupon")
@ApiModel(value="JdDiscountCoupon对象", description="优惠券")
public class JdDiscountCoupon extends Model<JdDiscountCoupon> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "优惠金额（折扣/优惠金额）")
    @TableField("discount_value")
    private BigDecimal discountValue;

    @ApiModelProperty(value = "满减金额")
    @TableField("meet_value")
    private BigDecimal meetValue;

    @ApiModelProperty(value = "使用开始时间")
    @TableField("use_start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private String useStartTime;

    @ApiModelProperty(value = "使用结束时间")
    @TableField("use_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private String useEndTime;

    @ApiModelProperty(value = "领取开始时间")
    @TableField("receive_start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private String receiveStartTime;

    @ApiModelProperty(value = "领取结束时间")
    @TableField("receive_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private String receiveEndTime;

    @ApiModelProperty(value = "数量")
    @TableField("num")
    private Integer num;

    @ApiModelProperty(value = "剩余数量")
    @TableField("remain_num")
    private Integer remainNum;

    @ApiModelProperty(value = "优惠券类型(0-立减 1-满减)")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField("create_time")
    private String createTime;

    @ApiModelProperty(value = "创建人")
    @TableField("create_user")
    private String createUser;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField("update_time")
    private String updateTime;

    @ApiModelProperty(value = "更新人")
    @TableField("update_user")
    private String updateUser;

    @TableField(exist = false)
    @ApiModelProperty(value = "领取状态 0未领取 1已领取")
    private String status;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
